#pragma once

#include <string>
#include "PMesh.h"

namespace MeshProcessing {
	class BoolManager {
	public:
		static PMesh* intersection(Handle mesh1, Handle mesh2, bool bRemoveDuplicates, bool bRemoveDegenerate);
		static PMesh* difference(Handle mesh1, Handle mesh2, bool bRemoveDuplicates, bool bRemoveDegenerate);
		static PMesh* unions(Handle mesh1, Handle mesh2, bool bRemoveDuplicates, bool bRemoveDegenerate);

		static bool doUnion(PMesh* mesh1, PMesh* mesh2, PMesh* out, bool bRemoveDuplicates, bool bRemoveDegenerate);
		static bool doIntersection(PMesh* mesh1, PMesh* mesh2, PMesh* out, bool bRemoveDuplicates, bool bRemoveDegenerate);
		static bool doDifference(PMesh* mesh1, PMesh* mesh2, PMesh* out, bool bRemoveDuplicates, bool bRemoveDegenerate);

		static bool checkSolid(PMesh* mesh, bool bRemoveDuplicates, bool bRemoveDegenerate);

		static std::string getErrorMessage();

	private:

		static std::string ERROR_MESSAGE;
	};
}
